Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Sep 10, 2025


PR-Codex overview

This PR focuses on passing through the authorizationList for injected wallet providers in the thirdweb package.

Detailed summary

  • Updated the packages/thirdweb/src/wallets/injected/index.ts file.
  • Modified the params object to include ...tx and ...gasFees.
  • Removed the accessList and data properties from the params object.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Bug Fixes

    • Injected wallet transactions now pass through all supported transaction fields, including authorizationList, improving compatibility with newer Ethereum features and dapps that require these fields.
    • Resolves issues where transactions could fail or be malformed due to omitted advanced fields.
  • Chores

    • Added patch release entry for the package.

@vercel
Copy link

vercel bot commented Sep 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Sep 10, 2025 8:41pm
nebula Ready Ready Preview Comment Sep 10, 2025 8:41pm
thirdweb_playground Ready Ready Preview Comment Sep 10, 2025 8:41pm
thirdweb-www Ready Ready Preview Comment Sep 10, 2025 8:41pm
wallet-ui Ready Ready Preview Comment Sep 10, 2025 8:41pm

@changeset-bot
Copy link

changeset-bot bot commented Sep 10, 2025

🦋 Changeset detected

Latest commit: ee54772

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 10, 2025

Walkthrough

Adds a changeset for a patch release. Updates injected wallet transaction parameter construction to spread the full tx object into eth_sendTransaction params, while retaining existing explicit fields and gas fee handling.

Changes

Cohort / File(s) Summary
Release metadata
\.changeset/twelve-ducks-beg.md
Adds a patch changeset for the thirdweb package noting pass-through of authorizationList for injected providers.
Injected wallet tx param construction
packages/thirdweb/src/wallets/injected/index.ts
Changes eth_sendTransaction param building: spreads ...tx into the params, keeping existing explicit fields (from, gas, nonce, to, value, ...tx.eip712) and gas fee handling; removes explicit accessList/data entries to rely on spread, enabling additional tx fields to pass through.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor D as DApp
  participant IW as Injected Wallet (thirdweb)
  participant EP as EIP-1193 Provider
  participant CH as Chain Node

  D->>IW: sendTransaction(tx)
  Note over IW: Build params with {...tx}, gas fees,<br/>from, to, value, nonce, eip712
  IW->>EP: ethereum.request({ method: "eth_sendTransaction", params: [txParams] })
  EP->>CH: eth_sendTransaction(txParams)
  CH-->>EP: tx hash or error
  EP-->>IW: result
  IW-->>D: result
  rect rgba(230, 245, 255, 0.5)
    Note over IW: Changed: pass through all tx fields (e.g., authorizationList) via spread
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks (1 passed, 2 warnings)

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current pull request description retains the template comments and a PR-Codex overview but does not fill in the required sections such as the formatted title, issue tag, Notes for the reviewer, and How to test, leaving out critical information expected by the repository’s description template. Please replace the commented template with actual sections by providing the formatted title line, any relevant issue or branch tag, a Notes for the reviewer section that highlights key considerations, and a How to test section outlining steps or tests to validate the change.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "[SDK] Pass through authorizationList for injected providers" accurately and concisely highlights the primary change of enabling authorizationList propagation in injected providers within the SDK, matching the PR summary and avoiding extraneous details.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch _SDK_Pass_through_authorizationList_for_injected_providers

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Sep 10, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.96 KB (0%) 1.3 s (0%) 474 ms (+170.45% 🔺) 1.8 s
thirdweb (cjs) 356.86 KB (0%) 7.2 s (0%) 1.9 s (+10.5% 🔺) 9 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 145 ms (+1705.85% 🔺) 259 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 81 ms (+981.26% 🔺) 92 ms
thirdweb/react (minimal + tree-shaking) 19.15 KB (0%) 383 ms (0%) 116 ms (+834.16% 🔺) 499 ms

@joaquim-verges joaquim-verges merged commit ef15ba7 into main Sep 10, 2025
19 of 24 checks passed
@joaquim-verges joaquim-verges deleted the _SDK_Pass_through_authorizationList_for_injected_providers branch September 10, 2025 20:30
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
.changeset/twelve-ducks-beg.md (1)

5-5: Nit: clarify the scope in the note.

Consider mentioning EIP-7702 explicitly and that the tx object is spread to allow authorizationList passthrough for injected providers.

packages/thirdweb/src/wallets/injected/index.ts (3)

200-211: Confirm override order (eip712 vs normalized fields).

...tx.eip712 at the end can override from/gas/fees you normalize above. If that’s intentional, ignore. If not, move the EIP‑712 spread before from, gas, etc., so normalized values win.


200-211: Data encoding sanity check.

You previously mapped numeric fields to hex; data is now forwarded as-is via ...tx. If tx.data can be non-hex (e.g., string/bytes), add normalization or document that callers must provide hex.


200-211: Strip chainId from eth_sendTransaction params
Destructure tx to omit chainId before spreading into params, e.g.:

-      const params = [
-        {
-          ...tx,
+      const { chainId: _omitChainId, eip712, ...txRest } = tx;
+      const params = [
+        {
+          ...txRest,
           ...gasFees,
           from: this.address,
           gas: tx.gas ? numberToHex(tx.gas) : undefined,
           nonce: tx.nonce ? numberToHex(tx.nonce) : undefined,
           to: tx.to ? getAddress(tx.to) : undefined,
           value: tx.value ? numberToHex(tx.value) : undefined,
-          ...tx.eip712,
+          ...eip712,
         },
       ];

Verify against MetaMask & Coinbase Wallet extensions.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a724bc3 and ee54772.

📒 Files selected for processing (2)
  • .changeset/twelve-ducks-beg.md (1 hunks)
  • packages/thirdweb/src/wallets/injected/index.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

.changeset/*.md: Each change in packages/* must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API

Files:

  • .changeset/twelve-ducks-beg.md
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size

Files:

  • packages/thirdweb/src/wallets/injected/index.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • packages/thirdweb/src/wallets/injected/index.ts
packages/thirdweb/src/wallets/**

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/wallets/**: Unified Wallet and Account interfaces in wallet architecture
Support for in-app wallets (social/email login)
Smart wallets with account abstraction
EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Files:

  • packages/thirdweb/src/wallets/injected/index.ts
packages/thirdweb/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling @example and a custom tag (@beta, @internal, @experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g., const { jsPDF } = await import("jspdf"))

Files:

  • packages/thirdweb/src/wallets/injected/index.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • packages/thirdweb/src/wallets/injected/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
.changeset/twelve-ducks-beg.md (1)

2-5: Patch bump is appropriate.

Change qualifies as a patch (behavioral passthrough; no public API surface change).

packages/thirdweb/src/wallets/injected/index.ts (1)

188-211: Remove suggestion to add authorizationList
SendTransactionOption already extends SerializableTransaction, which declares an optional authorizationList in packages/thirdweb/src/transaction/serialize-transaction.ts:28–30.

Likely an incorrect or invalid review comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants